package com.cruise.game.common.api;

/**
 * API状态码
 * 
 * @author cruise
 * @date 2025-02-28
 */
public interface ApiCode {

    /**
     * 成功
     */
    int SUCCESS = 200;
    
    /**
     * 失败
     */
    int FAIL = 500;
    
    /**
     * 未认证
     */
    int UNAUTHORIZED = 401;
    
    /**
     * 未授权
     */
    int FORBIDDEN = 403;
    
    /**
     * 参数错误
     */
    int PARAM_ERROR = 400;
    
    /**
     * 资源不存在
     */
    int NOT_FOUND = 404;
    
    /**
     * 请求方法不支持
     */
    int METHOD_NOT_ALLOWED = 405;
    
    /**
     * 请求超时
     */
    int REQUEST_TIMEOUT = 408;
    
    /**
     * 服务器内部错误
     */
    int INTERNAL_SERVER_ERROR = 500;
    
    /**
     * 服务不可用
     */
    int SERVICE_UNAVAILABLE = 503;
    
    /**
     * 业务异常
     */
    int BUSINESS_ERROR = 1000;
    
    /**
     * 用户相关错误 (1100-1199)
     */
    int USER_NOT_EXIST = 1100;
    int USER_PASSWORD_ERROR = 1101;
    int USER_ACCOUNT_FORBIDDEN = 1102;
    int USER_NOT_LOGIN = 1103;
    int USER_BALANCE_NOT_ENOUGH = 1104;
    
    /**
     * 订单相关错误 (1200-1299)
     */
    int ORDER_NOT_EXIST = 1200;
    int ORDER_STATUS_ERROR = 1201;
    int ORDER_CREATE_FAIL = 1202;
    
    /**
     * 代理相关错误 (1300-1399)
     */
    int AGENT_NOT_EXIST = 1300;
    int AGENT_APPLICATION_EXIST = 1301;
    int AGENT_STATUS_ERROR = 1302;
    
    /**
     * 支付相关错误 (1400-1499)
     */
    int PAYMENT_FAIL = 1400;
    int WITHDRAWAL_FAIL = 1401;
    
    /**
     * 系统级错误 (1500-1599)
     */
    int SYSTEM_ERROR = 1500;
    int UPLOAD_FAIL = 1501;
}
